package com.cskaoyan.controller.wx;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.service.CatalogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("wx/catalog")
public class CatalogController {

    @Autowired
    CatalogService catalogService;

    @GetMapping("current")
    public BaseRespVo currentCatalog(Integer id){
        Map<String,Object> map = catalogService.currentCatalog(id);
        return BaseRespVo.ok(map);
    }
    @GetMapping("index")
    public BaseRespVo catalogIndex(){
        Map<String,Object> map = catalogService.catalogIndex();
        return BaseRespVo.ok(map);
    }
}
